package com.KKd.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author 14587
 * @date 2020/11/2 22:02
 */
//等价于    <bean id="user" class="com.KKd.pojo.User"/>
//@Component组件
@Component
@Scope("singleton")
public class User {
    //相当于        <property name="user" value="xin"/>
    @Value("xin")
    public String name="dou";
}
